﻿using System.Windows.Controls;
using Oxage.Models;

namespace Oxage.Views
{
	public partial class ConsoleView : UserControl
	{
		#region Constructor
		public ConsoleView()
		{
			InitializeComponent();

			//Initialize console
			console.Write("Type 'help' to start.");
			console.CommandExecuted += (sender, e) =>
			{
				ViewModel.HandleCommand(console, e);
			};
		}
		#endregion

		#region Properties
		public ConsoleViewModel ViewModel
		{
			get
			{
				return this.DataContext as ConsoleViewModel;
			}
		}
		#endregion
	}
}
